from google.appengine.ext import ndb


class ArtSection(ndb.Model):
    name = ndb.StringProperty()
    location = ndb.TextProperty()
    ble_android = ndb.StringProperty()
    ble_ios = ndb.StringProperty()


class ArtPiece(ndb.Model):
    ''' ArtSection must be the parent '''
    title = ndb.StringProperty()
    image_url = ndb.StringProperty()
    date = ndb.DateTimeProperty(auto_now_add=True)


class Caption(ndb.Model):
    ''' ArtPiece must be the parent '''
    user = ndb.UserProperty()
    text = ndb.TextProperty()
    date = ndb.DateTimeProperty(auto_now_add=True)


class CaptionFavs(ndb.Model):
    user = ndb.UserProperty()
